use std::env;

fn main() {
    let target = env::var("TARGET").unwrap();
    if target.starts_with("aarch64") {
        println!("cargo:rustc-link-search=native=crts/aarch64/");
    }
    println!("cargo:rustc-link-arg=-Tlinker.lds");
    println!("cargo:rustc-link-lib=static:+whole-archive=seminix-crt");
    println!("cargo:rustc-link-lib=static=seminix-crt-lib");
    println!("cargo:retrun-if-changed=build.rs");
}
